﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace grounding.nao.sensors
{
    /// <summary>
    /// Interface representing a sensor
    /// </summary>
    public interface ISensor
    {
        /// <summary>
        /// Instance-specific name of the sensor (ex. top_camera)
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Type string representing the class of sensor (ex. camera)
        /// </summary>
        string Type { get; }

        /// <summary>
        /// Gets the current frame of data from this sensor.
        /// </summary>
        ISensorFrame GetSensorFrame();

        /// <summary>
        /// Gets the current frame of data from this sensor using the transformer function to
        /// transform the data first.
        /// </summary>
        /// <param name="transformer">The function that will transform the data</param>
        /// <returns></returns>
        ISensorFrame GetSensorFrame(Func<IEnumerable<double>, IEnumerable<double>> transformer);
    }
}
